package com.andong.utils;

import java.util.Arrays;
import java.util.List;

/**
 * ClassName: SystemConstant
 *
 * @author XHU_WHY
 * @version V1.0
 * @since 2023/12/30 19:43
 */
public class SystemConstant {

    // JWT令牌密钥
    public static final String SING_KEY = "token_ad";
    // 未登录信息
    public static final String NOT_LOGIN_MESSAGE = "NOT_LOGIN";
    // 账号状态发生变化
    public static final String STATUS_CHANGE = "STATUS_CHANGE";
    // 权限信息发生改变
    public static final String AUTH_CHANGE = "AUTH_CHANGE";
    // 更新JWT设置的响应头
    public static final String AD_JWT = "ad_jwt";
    // 学员身份
    public static final String STUDENT = "student";
    // 教练身份
    public static final String COACH = "coach";
    // 管理员身份
    public static final String ADMIN = "admin";
    // 超级管理员身份
    public static final String SUPER_ADMIN = "super_admin";
    // JWT令牌id属性
    public static final String JWT_KEY_ID = "id";
    // JWT令牌身份属性
    public static final String JWT_KEY_IDENTITY = "identity";
    // JWT令牌账号状态属性
    public static final String JWT_KEY_STATUS = "status";
    // JWT令牌管理员权限属性
    public static final String JWT_KEY_AUTH = "auth";
    // 创建时间
    public static final String CREATE_TIME = "createTime";
    // 修改时间
    public static final String UPDATE_TIME = "updateTime";
    // 白名单验证列表
    public static final List<String> ALLOWED_TABLES = Arrays.asList("student", "coach", "admin");
    // 用户名或密码错误
    public static final String USERNAME_OR_PASSWORD_ERROR = "用户名或密码错误";
    // 验证码错误
    public static final String CODE_ERROR = "验证码错误！";
    // 验证码有效期
    public static final Long CODE_VALIDITY = 5L;
    // 验证码长度
    public static final int CODE_LENGTH = 4;
    // 身份不正确提示信息
    public static final String IDENTITY_ERROR = "请选择正确的登录身份！";
    // 正常状态信息
    public static final String ACCOUNT_NORMAL = "状态正常！";
    // 正常状态代码
    public static final Integer ACCOUNT_NORMAL_CODE = 1;
    // 禁用状态信息
    public static final String ACCOUNT_FORBIDDEN = "账号被禁用！";
    // 禁用状态代码
    public static final int ACCOUNT_FORBIDDEN_CODE = 0;
    // 年龄不合规
    public static final  String AGE_ERROR = "年龄不满足申请要求！";
    // 没有访问权限
    public static final String NO_AUTH = "NO_AUTH";

    // 密码加密密钥
    public static final String HS_256_KEY = "ad_password";

    // 密码加密算法
    public static final String PASSWORD_TYPE = "HmacSHA256";

    // 所有账号状态
    public static final List<Integer> ALL_ACCOUNT_STATUS = Arrays.asList(0, 1);
    // 所有预约状态
    public static final List<Integer> ALL_REGISTER_STATUS = Arrays.asList(1, 2, 3, 4, 5);

    // redis缓存账号状态key值前缀
    public static final String ACCOUNT_STATUS = "account-status-";
    // redis缓存账号状态过期时间
    public static final Integer ACCOUNT_STATUS_EXPIRE = 10;
    // redis缓存管理员权限信息的key前缀
    public static final String ADMIN_AUTH = "adminAuth";
    // redis缓存管理员权限信息有效期
    public static final Integer ADMIN_AUTH_EXPIRE = 10;
    // BaseContext.getCurrentIdAndIdentity()索引值
    public static final Integer CURRENT_ID = 0;
    public static final Integer CURRENT_IDENTITY = 1;
    // 手机号错误信息
    public static final String PHONE_ERROR = "手机号错误！";
    // 原密码错误
    public static final String PRE_PASSWORD_ERROR = "原密码错误！";
    // 状态参数错误
    public static final String STATUS_ERROR = "状态参数错误！";
    // 账号必须以“a”开头
    public static final String ACCOUNT_START_WITH_A = "账号必须以“a”开头！";
    // 管理员账号前缀
    public static final String ADMIN_ACCOUNT_PREFIX = "a";
    // 账号必须以“a”开头
    public static final String ACCOUNT_START_WITH_C = "账号必须以“c”开头！";
    // 教练账号前缀
    public static final String COACH_ACCOUNT_PREFIX = "c";
    // 账号必须以“s”开头
    public static final String ACCOUNT_START_WITH_S = "账号必须以“s”开头！";
    // 教练账号前缀
    public static final String STUNDENT_ACCOUNT_PREFIX = "s";
    // 用户名存在
    public static final String USERNAME_EXIST = "用户名已存在！";
    // 手机号已经被其他账号绑定
    public static final String PHONE_BINDING = "手机号已经被其他账号绑定！";
    // 身份证号已被其他账号绑定
    public static final String ID_BINDING = "身份证号已被其他账号绑定！";
    // 毕业状态值
    public static final Integer FINISH = 5;
    // 0
    public static final int ZERO = 0;
    // 该教练名下存在未毕业学员，不允许删除
    public static final String COACH_HAS_STUDENT = "该教练名下存在未毕业学员，不允许删除！";
    // 最低分0
    public static final int MIN_SCORE = 0;
    // 最高分5
    public static final int MAX_SCORE = 5;
    // 请选择正确的分数
    public static final String SELECT_SCORE_ERROR = "请选择正确的分数！";
    // 不允许操作他人评分
    public static final String COACH_SCORE_ERROR = "不允许操作他人评分！";
    // 只允许给自己教练评分
    public static final String COACH_SCORE_SELF_ERROR = "只允许给自己教练评分！";
    // 不允许操作他人评论
    public static final String COMMENT_ERROR = "不允许操作他人评论！";
    // 只能评价自己的教练
    public static final String COMMENT_SELF_ERROR = "只能评价自己的教练！";
    // SUCCESS
    public static final String SUCCESS = "SUCCESS";
    // 空字符串
    public static final String EMPTY_STRING = "";
    // 评论不能为空
    public static final String COMMENT_EMPTY = "评论不能为空！";
    // .
    public static final String POINT = ".";

    // 视频上传进度前缀
    public static final String VIDEO_UPLOAD_PROGRESS = "progress";
    // 用户不存在
    public static final String USER_NOT_EXIST = "用户不存在！";

    // 科目三
    public static final String SUBJECT_THREE = "科目三";
    public static final int SUBJECT_THREE_NUMBER = 3;
    // 科目二
    public static final String SUBJECT_TWO = "科目二";
    public static final int SUBJECT_TWO_NUMBER = 2;
    // 注册拒绝
    public static final int REFUSED_REGISTER = 5;
    // 注册同意
    public static final int AGREE_REGISTER = 4;
    // 文件类型错误，只支持xls和xlsx文件！
    public static final String FILE_TYPE_ERROR = "文件类型错误，只支持xls和xlsx文件！";
    // .xls
    public static final String XLS = ".xls";
    public static final String XLSX = ".xlsx";
    // 科目四题目缓存前缀
    public static final String SUBJECT_FOUR_CACHE = "subjectFour";
    // 科目一题目缓存前缀
    public static final String SUBJECT_ONE_CACHE = "subjectOne";
    // 题目缓存时间
    public static final Integer SUBJECT_CACHE_EXPIRE = 10;
    // 科目四数字
    public static final int SUBJECT_FOUR_NUMBER = 4;
    // 科目一数字
    public static final int SUBJECT_ONE_NUMBER = 1;
    // 题目不完整
    public static final String SUBJECT_ERROR = "题目不完整！";
    // 题目不存在
    public static final String SUBJECT_NOT_EXIST = "题目不存在！";
    // 视频缓存
    public static final String VIDEO_CACHE = "subjectVideo";
    // 只能预约到未来一周
    public static final String ONLY_FUTURE_WEEK = "只能预约到未来一周！";
    // 该车辆在这个时间已经被预约
    public static final String VEHICLE_BOOKING_ERROR = "该车辆在这个时间已经被预约！";
    // 已过期，禁止处理
    public static final String EXPIRED = "已过期，禁止处理！";
    // 不能删除在预约中的车辆
    public static final String VEHICLE_BOOKING_DELETE_ERROR = "不能删除在预约中的车辆！";
    // 不能修改在预约中的车辆
    public static final String VEHICLE_BOOKING_UPDATE_ERROR = "不能修改在预约中的车辆！";
    // 该车辆已存在
    public static final String VEHICLE_EXISTS = "该车辆已存在！";
    // 不允许添加超级管理员
    public static final String SUPER_ADMIN_ERROR = "不允许添加超级管理员！";
}
